package com.ttc.ssm.service.home;

import com.ttc.ssm.common.DeliveryPage;
import com.ttc.ssm.common.MailPage;
import com.ttc.ssm.po.Company;
import com.ttc.ssm.po.Customer;
import com.ttc.ssm.po.Delivery;
import com.ttc.ssm.po.InviteActivity;
import com.ttc.ssm.po.Invite;
import com.ttc.ssm.po.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by Jiarui on 2016/8/3.
 */
public interface HomeCustomerService {
    public Customer getCustomerByTelephone(String telephone) throws Exception;
    public Customer getCustomerById(int customer_id) throws Exception;
    public Company getCompanyByEmail(String e_mail) throws Exception;
    public int register_customer(Customer customer, HttpServletRequest request) throws Exception;
    public int checkExist(Map map) throws Exception;
    public int update_customer(Customer customer, HttpServletRequest request) throws Exception;
    public int save_psd(Customer customer) throws Exception;

    int countDeliveryRowsByMap(Map map) throws Exception;
    int countInviteRowsByCustomerId(int customer_id) throws Exception;


    List<Delivery> selectDeliveryForPage(DeliveryPage deliveryPage) throws Exception;
    int countRows(DeliveryPage deliveryPage) throws Exception;
    List<Invite> selectInviteForPage(DeliveryPage deliveryPage) throws Exception;
    int countInviteRows(DeliveryPage deliveryPage) throws Exception;
    public int countRowsNoReadCustomer(int customer_id) throws Exception;
    public int countRowsNoReadCustomerForEmail(MailPage mailPage) throws Exception;
    public int countRowsNoReadCustomerDeliveryForEmail(MailPage mailPage) throws Exception;
    public List<InviteActivity> selectActivityCustomer(int customer_id) throws Exception;
    public List<InviteActivity> selectActivityCustomerForPage(MailPage mailPage) throws Exception;
    public int countRowsNoReadCustomerDelivery(int customer_id) throws Exception;
    public List<DeliveryActivity> selectDeliveryActivityCustomer(int customer_id) throws Exception;
    public List<DeliveryActivity> selectDeliveryActivityCustomerForMail(MailPage mailPage) throws Exception;
}
